package com.rongshu.view.home.activity;

import android.support.v4.content.ContextCompat;

import com.rongshu.R;
import com.rongshu.view.base.BaseActivity;
import com.rongshu.view.home.adapter.DaySignTypePageAdapter;
import com.rongshu.widget.TabPageIndicator;
import com.widget.NoScrollViewPager;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * created by zhengweis on 2019/2/20.
 * description：
 */
public class DaySignListActivity extends BaseActivity {
    @BindView(R.id.indicator)
    TabPageIndicator indicator;
    @BindView(R.id.viewPager)
    NoScrollViewPager viewPager;

    @Override
    protected int initLayout() {
        return R.layout.activity_day_sign_list;
    }

    @Override
    protected void initView() {
        DaySignTypePageAdapter adapter = new DaySignTypePageAdapter(getSupportFragmentManager());
        viewPager.setAdapter(adapter);
        indicator.setViewPager(viewPager);
        indicator.setIndicatorMode(TabPageIndicator.IndicatorMode.MODE_WEIGHT_NOEXPAND_SAME);// 设置模式，一定要先设置模式
        indicator.setTextColor(ContextCompat.getColor(this, R.color.color_2c2c2c));
        indicator.setIndicatorColor(ContextCompat.getColor(this, R.color.color_3CC051));// 设置底部导航线的颜色
        indicator.setTextColorSelected(ContextCompat.getColor(this, R.color.color_3CC051));// 设置tab标题选中的颜色
        indicator.setTextSize((int) getResources().getDimension(R.dimen.dd_dimen_30px));// 设置字体大小
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void updateViews(boolean isRefresh) {

    }

    @OnClick(R.id.head_back)
    public void onViewClicked() {
        finish();
    }
}
